package java_class.Student_class;

public class Student {
    private String name;
    private int age;

    // 构造函数
    public Student() {
        System.out.println("这是一个没有参数的构造函数");
    }

    public Student(String name, int age) {
        this.name = name;
        this.age = age;
        System.out.println("有参数的构造函数被调用了");
    }

    public int getAge() {
        return age;
    }

    public String getName() {
        return name;
    }
}
